<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@ include file="/include/taglibs.jsp" %>
<html>
<head>
    <%@include file="/include/header.html" %>
    <script type="text/javascript" src="${ctx}/appjs/tenant/user/tenantSetting.js"></script>
</head>

<script type="text/javascript">
    $('#topLink', window.parent.document).html(function (i, origText) {

    });

</script>

<body class="gray-bg">
<div class="wrapper wrapper-content ">
    <div class="row">
        <div class="col-sm-12">
            <div class="ibox float-e-margins">
                <div class="ibox-title">
                    <div class="titleBorder "><span class="titlePiece"></span><span class="orderInfoTitleFont"
                                                                                    style="font-size: 250%;">设置</span>
                    </div>
                    <div class="ibox-tools">
                        <a class="close-link">
                            <i class="fa fa-times"></i>
                        </a>
                    </div>
                </div>
                <div class="ibox-content">
                    <form class="form-horizontal m-t" id="frmTenantSetting">
                        <input type="hidden" name="tenantCode" id="tenantCode" value="${tenantSetting.tenantCode}">
                        <div class="form-group row">
                            <label class="col-sm-3 col-form-label text-right">普通用户最小启动充电余额：</label>
                            <div class="col-sm-4">
                                <input type="text" class="form-control" id="startChargeAccountMin"
                                       name="startChargeAccountMin" value="${tenantSetting.startChargeAccountMin}"
                                       style="display: inline-block;">
                            </div>
                            <span style="display: inline-block;">元&emsp;&emsp;</span>
                            <span style="display: inline-block;color: red">建议设置1元,金额过小可能导致结算后用户余额为负数</span>
                        </div>

                        <div class="form-group row">
                            <label class="col-sm-3 col-form-label text-right">一号多充用户最小启动充电余额：</label>
                            <div class="col-sm-4">
                                <input type="text" class="form-control" id="startMultChargeAccountMin"
                                       name="startMultChargeAccountMin"
                                       value="${tenantSetting.startMultChargeAccountMin}">
                            </div>
                            <span style="display: inline-block;">元</span>
                        </div>

                        <div class="form-group row">
                            <label class="col-sm-3 col-form-label text-right">共享充电,用户最小启动余额：</label>
                            <div class="col-sm-4">
                                <input type="text" class="form-control" id="startShareChargeAccountMin"
                                       name="startShareChargeAccountMin"
                                       value="${tenantSetting.startShareChargeAccountMin}">
                            </div>
                            <span style="display: inline-block;">元</span>
                        </div>

                        <div class="form-group row">
                            <label class="col-sm-3 col-form-label text-right">余额不足停止充电金额：</label>
                            <div class="col-sm-4">
                                <input type="text" class="form-control" id="stopChargAccountMin"
                                       name="stopChargAccountMin" value="${tenantSetting.stopChargAccountMin}">
                            </div>
                            <span style="display: inline-block;">元&emsp;&emsp;</span>
                            <span style="display: inline-block;color: red">建议设置1元,金额过小可能导致结算后用户余额为负数</span>
                        </div>

                        <div class="form-group row">
                            <label class="col-sm-3 col-form-label text-right">线上充值最小起步金额：</label>
                            <div class="col-sm-4">
                                <input type="text" class="form-control" id="minStartMoney"
                                       name="minStartMoney" value="${minAmount}">
                            </div>
                            <span style="display: inline-block;">元</span>
                        </div>

                        <div class="form-group row">
                            <label class="col-sm-3 col-form-label text-right">企业开发票最低金额(元)：</label>
                            <div class="col-sm-4">
                                <input type="text" class="form-control" id="invoiceEnterpriseAmountMin"
                                       name="invoiceEnterpriseAmountMin"
                                       value="${tenantSetting.invoiceEnterpriseAmountMin}">
                            </div>
                            <span style="display: inline-block;">元</span>
                        </div>

                        <%--<div class="form-group row">--%>
                        <%--<label class="col-sm-3 col-form-label text-right">平台车辆充电SOC限制值：</label>--%>
                        <%--<div class="col-sm-4">--%>
                        <%--<input type="text" class="form-control" id="defaultChargeMaxSoc"--%>
                        <%--name="defaultChargeMaxSoc" value="${tenantSetting.defaultChargeMaxSoc}"  >--%>
                        <%--</div>--%>
                        <%--</div>--%>


                        <div class="form-group">
                            <div class="col-sm-4 col-sm-offset-8 text-right">
                                <button type="submit" class="btn btn-primary">保存设置</button>
                                <span>上次保存时间:<fmt:formatDate value="${tenantSetting.lastUpdatedTime}"
                                                             pattern="yyyy-MM-dd HH:mm:ss"/></span>
                            </div>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>
<script type="text/javascript">
    editTenantSetting.init();
</script>
</body>
</html>
